package com.trendwise.software;

import java.io.IOException;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.mapreduce.Reducer;

public class WebReducer extends Reducer<DateWritable,IntWritable,DateWritable,IntWritable>{

	@Override
	protected void reduce(DateWritable key, Iterable<IntWritable> vals,
			Reducer<DateWritable, IntWritable, DateWritable, IntWritable>.Context context)
			throws IOException, InterruptedException {
		// TODO 자동 생성된 메소드 스텁
		
		  int c=0;
		  
		  for(IntWritable val :vals){
			  
			  c+=val.get();
			  
		  }
		  
		  context.write(key, new IntWritable(c));
	}

}
